Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dom-accessibility-api

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dom-accessibility-api

Implements https://w3c.github.io/accname/

  • 0.6.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20M
increased by0.5%
Maintainers
1
Weekly downloads
 
Created

What is dom-accessibility-api?

The dom-accessibility-api package is a library that provides utility functions for querying and manipulating the accessibility tree of DOM elements. It allows developers to retrieve accessible names and descriptions, roles, and other properties related to accessibility, which are crucial for building web applications that are compliant with accessibility standards.

What are dom-accessibility-api's main functionalities?

Getting the accessible name

This feature allows you to retrieve the accessible name of a DOM element, which is the name that screen readers will announce to users.

import { getAccessibleName } from 'dom-accessibility-api';
const element = document.getElementById('myElement');
const accessibleName = getAccessibleName(element);

Getting the accessible description

This feature allows you to retrieve the accessible description of a DOM element, providing additional context to assistive technologies.

import { getAccessibleDescription } from 'dom-accessibility-api';
const element = document.getElementById('myElement');
const accessibleDescription = getAccessibleDescription(element);

Getting the role

This feature allows you to get the computed role of a DOM element, which is used by assistive technologies to understand the purpose of the element.

import { getRole } from 'dom-accessibility-api';
const element = document.getElementById('myElement');
const role = getRole(element);

Other packages similar to dom-accessibility-api

Keywords

FAQs

Package last updated on 18 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc